<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="jquery.js"></script> 
<script type="text/javascript" src="jquery-ui.min.js"></script> 
<script type="text/javascript" src="grid3.2_guangdian.js"></script>
</head>
<body>

<div id="testGrid" style="margin-top:20px;">  


</div> 
<button id="bt1">bt1</button>
<div id="testGrid1" style="margin-top:20px;">  


</div>


<script type="text/javascript">
         
		(function() { 
			$("#testGrid").houzhuoGrid({
				table_div:"testGrid",
				tableWidth:1000,
				tableHeight:400, 
				checkbox:true,
				autoColWidth:true,
				page:true,
				type:"post",
				fontsize:16,
				checkBoxSize:22,
				optionList:["icon1","","","icon4"], 
				url:"${pageContext.request.contextPath}/demo.do",
				param:{start:1,count:223,limit:20,userName:"aaaa",userId:"678"},
				columns:[
					{name:"table_id",showName:"主键id",width:100,hidden:false,order:false},
					{name:"nubmer",showName:"数值",width:100,hidden:false,order:true},
					{name:"state",showName:"状态",width:100,hidden:false,order:true,format:function(data,row){ 
						if(row.state ==1){
							return '<font color=red>fuck</font>';
						}else{ 
							return '<font color=green>fuck</font>';
						} 
					}},
					{name:"name",showName:"名称",width:400,hidden:false,order:false},
					{name:"value",showName:"内容",width:300,hidden:false,order:true} 
				]
			});
			
			
			$("#testGrid1").houzhuoGrid({
				table_div:"testGrid1",
				tableWidth:1000,
				tableHeight:500, 
				checkbox:true,
				autoColWidth:false,
				page:true,
				type:"post",
				checkBoxSize:22,
				fontsize:16,
				optionList:["icon1","icon2","icon3","icon4"], 
				url:"${pageContext.request.contextPath}/demo.do",
				param:{start:1,count:223,limit:20,userName:"aaaa",userId:"678"},
				columns:[
					{name:"table_id",showName:"主键id",width:100,hidden:false,order:false},
					{name:"nubmer",showName:"数值啊啊啊啊啊基本",width:100,hidden:false,order:true},
					{name:"state",showName:"状态",width:100,hidden:false,order:true,format:function(data,row){ 
						if(row.state ==1){
							return '<font color=red>fuck</font>';
						}else{ 
							return '<font color=green>fuck</font>';
						} 
					}},
					{name:"name",showName:"名称",width:100,hidden:false,order:false},
					{name:"value",showName:"内容",width:300,hidden:false,order:true} 
				]
			});
		})();   
		
		$("#bt1").click(function(){ 
			var array = $("#testGrid").houzhuoGrid("getRows");
			alert(array);
		});
	</script>
</body>
</html>